package cn.smxy.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@Data
@TableName("campus")
@NoArgsConstructor
@AllArgsConstructor
public class Campus implements Serializable {
    private static final long serialVersionUID = -7936861936547654453L;

    @TableId(type = IdType.ASSIGN_ID,value = "campus_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long campusId;

    @NotNull
    @JsonSerialize(using = ToStringSerializer.class)
    private Long collegeId;

    @NotBlank
    private String studentNumber;

    @NotBlank
    private String realName;

    @NotNull
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    private Long createTime;
}
